package com.atguigu.springboot.controller;

import com.google.common.collect.Lists;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;


/**
 * @author : wenchao.long
 * @date : Created in 2020/11/17 17:52 周二
 * @description :
 */
@Controller
public class HelloController {

    @RequestMapping("/hello")
    @ResponseBody
    public String hello() {
        return "hello";
    }

    @RequestMapping("/success")
    public String success(Map<String, Object> map) {
        map.put("users", Lists.newArrayList("张三","李四","王五"));
        map.put("hello", "<h1>你好</h1>");
        return "success";
    }
}
